﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using unigator.Responses;

namespace services
{
    [ServiceContract]
    public interface IApp
    {
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/findPathFromTo/?from={from}&to={to}")]
        List<Node> FindPathFromTo(int from, int to);

        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/findPointByName/?name={name}")]
        List<Point> FindPointByName(string name);

        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/CalculateDistance/?long1={long1}&long2={long2}&lat1={lat1}&lat2={lat2}")]
        void CalculateDistance(double long1, double long2, double lat1, double lat2);

        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/checkExistingVertexInRange/?longtitude={longtitude}&latitude={latitude}")]
        void CheckExistingVertexInRange(double longtitude, double latitude);

        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GeneratePaths/")]
        void GeneratePaths();

        //[OperationContract]
        //void FindVertexByLongLat(double longtitude, double latitude);

        //[OperationContract]
        //void AddVertex(double longtitude, double latitude);

        //[OperationContract]
        //void AddIntrestPoint(int vertex_id, string name);

        //[OperationContract]
        //  void AddEdge(Vertex inVertex, Vertex outVertex);
    }
}
